package com.lykj.modules.shop.wrapper;

import com.lykj.core.mp.support.BaseEntityWrapper;
import com.lykj.core.tool.utils.BeanUtil;
import com.lykj.modules.shop.entity.StoreMarket;
import com.lykj.modules.shop.vo.StoreMarketVO;

import java.util.Objects;

/**
 * 贡献值行情表包装类,返回视图层所需的字段
 *
 * @author cxl
 * @since 2022-01-14
 */
public class StoreMarketWrapper extends BaseEntityWrapper<StoreMarket, StoreMarketVO> {

	public static StoreMarketWrapper build() {
		return new StoreMarketWrapper();
	}

	@Override
	public StoreMarketVO entityVO(StoreMarket storeMarket) {
		StoreMarketVO storeMarketVO = Objects.requireNonNull(BeanUtil.copy(storeMarket, StoreMarketVO.class));

		//User createUser = UserCache.getUser(storeMarket.getCreateUser());
		//User updateUser = UserCache.getUser(storeMarket.getUpdateUser());
		//storeMarketVO.setCreateUserName(createUser.getName());
		//storeMarketVO.setUpdateUserName(updateUser.getName());

		return storeMarketVO;
	}

}
